package c.j.a.c.k;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.Toast;
import c.j.a.a.a.a.g;
import c.j.a.a.a.e.c;

/* compiled from: DefaultDownloadUIFactory */
public class d implements g {
    public void a(int i, Context context, c.j.a.a.a.c.d dVar, String str, Drawable drawable, int i2) {
        Toast.makeText(context, str, 0).show();
    }

    public Dialog b(c cVar) {
        AlertDialog show = new Builder(cVar.a).setTitle(cVar.b).setMessage(cVar.c).setPositiveButton(cVar.d, new b(cVar)).setNegativeButton(cVar.e, new a(cVar)).show();
        show.setCanceledOnTouchOutside(cVar.f);
        show.setOnCancelListener(new c(cVar));
        Drawable drawable = cVar.g;
        if (drawable != null) {
            show.setIcon(drawable);
        }
        return show;
    }
}
